local gamelib = require "club.threecard.gamelib"
local game = require "club.threecard.bjracing"

local game_info = gamelib.ui.element()

game_info.store_watchers = 
{
    ingame = 
    {
        ["on_change_bet_amount"] = function(self, store, state, args)
            self:update_bet_amount(state.bet_amount, state.old);
        end
    }
}

function game_info:ctor()
    self.res = "club.threecard.bjracing/ui/gamescene.b:game_info";
    self.app = game;
end

function game_info:update_bet_amount(value, old)
    self.amount_txt.text = string.format("$%s", value);
end

return game_info